﻿using Domain.Entities.Modulers;
using FluentMigrator;
using FrameworkCore.Extensions;

namespace Domain.Migrations.Modulers;

[Migration(202501022012)]
public class ModulerLibraryAddColumn : ForwardOnlyMigration
{
    public override void Up()
    {
        Alter.Table(MigrationExpressions.GetTableName(typeof(ModulerLibrary)))
          .AddColumn(MigrationExpressions.ColumnNameFor<ModulerLibrary>(nameof(ModulerLibrary.Title))).AsString(100).Nullable().WithColumnDescription("标题")
          .AddColumn(MigrationExpressions.ColumnNameFor<ModulerLibrary>(nameof(ModulerLibrary.Name))).AsString(100).Nullable().WithColumnDescription("名称")
          .AddColumn(MigrationExpressions.ColumnNameFor<ModulerLibrary>(nameof(ModulerLibrary.Version))).AsString(20).Nullable().WithColumnDescription("版本号");
    }
}